package com.yunsom.testdemo.util;

/**
 * @author Xbao
 * @version 1.0
 * @description
 * @date 2020/12/30 10:22
 */
public class ReplaceStringUtil {

  public static void main(String[] args) {
    String text = "{\\\"lastTime\\\":\\\"2021-11-24 18:20:34.314\\\",\\\"iotId\\\":\\\"cShU54rqPr0QbtFQBzcV000000\\\",\\\"utcLastTime\\\":\\\"2021-11-24T10:20:34.314Z\\\",\\\"clientIp\\\":\\\"106.92.58.13\\\",\\\"utcTime\\\":\\\"2021-11-24T10:20:34.314Z\\\",\\\"offlineReasonCode\\\":1912,\\\"time\\\":\\\"2021-11-24 18:20:34.314\\\",\\\"productKey\\\":\\\"a1OG8PnPnYW\\\",\\\"deviceName\\\":\\\"device_test_1\\\",\\\"status\\\":\\\"offline\\\"}";
    System.out.println(text.replaceAll("\\\\",""));
  }

  public String repalceString(String originText,String regexText,String replacement){
    return originText.replaceAll(regexText,replacement);
  }

}
